<template>
  <div class="fillcontain">
    <head-top></head-top>
    <div class="table_container">
      <el-table
        :data="tableData6"
        :span-method="objectSpanMethod"
        border
        style="width: 100%; margin-top: 20px">
        <el-table-column
          prop="id"
          label="工位号"
          width="180">
        </el-table-column>
        <el-table-column
          prop="name"
          label="姓名"
          width="180">
        </el-table-column>
        <el-table-column
          label="进度展示">
          <el-table-column
          prop="province"
          label="任务说明"
          width="130">
            <template slot-scope="scope">
              <el-progress :text-inside="true" :stroke-width="18" :percentage="scope.row.amount1"></el-progress>
            </template>
        </el-table-column>
          <el-table-column
            prop="city"
            label="教程学习"
            width="130">
          </el-table-column>
          <el-table-column
            prop="address"
            label="任务实训"
            width="130">
          </el-table-column>
          <el-table-column
            prop="zip"
            label="教程实训"
            width="130">
          </el-table-column>
          <el-table-column
            prop="zip"
            label="实验报告"
            width="130">
          </el-table-column>

        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
  import headTop from './head.vue'
  //  import {baseUrl, baseImgPath} from '@/config/env'
  import {getTaskList, getPublishList, getObjectListC, publishTask, publishDel, getVerifyResult, stockOut, stockStatus} from '@/api/api'
  export default {
    data () {
      return {
        tableData6: [{
          id: '1',
          name: '张桑',
          amount1: '20',
          amount2: '3.2',
          amount3: 10
        }, {
          id: '1',
          name: '王小明',
          amount1: '40',
          amount2: '4.43',
          amount3: 12
        }, {
          id: '2',
          name: '李虎',
          amount1: '0',
          amount2: '1.9',
          amount3: 9
        }, {
          id: '3',
          name: '王小雷',
          amount1: '60',
          amount2: '2.2',
          amount3: 17
        }, {
          id: '3',
          name: '孙德',
          amount1: '40',
          amount2: '4.1',
          amount3: 15
        }]
      }
    },
    components: {
      headTop
    },
    methods: {
      objectSpanMethod({ row, column, rowIndex, columnIndex }) {
        if (columnIndex === 0) {
          if (rowIndex % 2 === 0) {
            return {
              rowspan: 2,
              colspan: 1
            }
          } else {
              return {
                rowspan: 0,
                colspan: 0
              }
          }
        }
        if (columnIndex > 2) {
          return {
            rowspan: 0,
            colspan: 0
          }
        } else if (columnIndex === 2) {
            return {
              rowspan: 1,
              colspan: 5
            }
        }
      }
    }
  };
</script>

<style scoped lang="less">
  .el-button {
    margin: 5px;
  }
</style>
